using System.Text.RegularExpressions;
using System.Web.Mvc;
using Coderoom.ScrumPlanner.Web.Helpers;
using Xunit;

namespace Coderoom.ScrumPlanner.Tests.Unit.MvcTests
{
	public class ClrExtensionTests
	{
		private readonly HtmlHelper htmlHelper;

		public ClrExtensionTests()
		{
			htmlHelper = new HtmlHelper(new ViewContext(), new ViewPage());
		}

		[Fact]
		public void GetExecutingAssemblyVersion_returns_assembly_version_string()
		{
			// act
			var result = htmlHelper.GetExecutingAssemblyVersion();

			// assert
			Assert.True(Regex.IsMatch(result, @"\d*.\d*.\d*.\d*"));
		}
	}
}